fixes the way imports are loaded#28
Conversation
|
👍 |
|
Hi @xavierlacot, First off thanks for your time and contributions! Secondly, my sincere apologies for the late response! Having said that, I'm not entirely sure what it is you're trying to accomplish here. Could you (or someone else) please show me a basic use-case that demonstrates what didn't work before, but will work with this change? If I do see a minor redundancy issue in the current code, but since that touches options.file as well, I won't fix that right away. |
|
Hi Ronald, Sorry, it has been a long time and I am not sure to remember perfectly. As far as I can remember, when using stss with @imports in parent- or sub- directories, the path resolution was not made correctly and resulted in file inclusion errors. Using a declarative way to pass the whole path of the included file allows to avoid this concern. Moreover, this allows to optimize the binding with grunt-stss, as stated in xavierlacot/grunt-stss@fa301fc |
The imports path resolution is done in an incomplete way, as it only relies on a combination of the current directory (
process.cwd()) and theoptions.includePathsthat the user might pass.This PR will use the
options.fileparameter to try and guess the right pass of the imported resource. As is, it even makes theoptions.includePathsoption useless (but it was kept for BC purpose).